home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 …SCII & the Runetime Code / ADC Developer CD (1992-07) (''Butch ASCII And The Runtime Code'')_iso / Dev.CD 199207.iso / Development Platforms / Apple II / HyperCardIIGS / Developer Documentation / ASCII Text / Media.Control.Stack < prev    next >
Encoding:
Text File  |  1992-02-27  |  11.2 KB  |  332 lines  |  [TEXT/pdos]

  1.  
  2.                              
  3. Media Control Stack
  4. ERS Version 1.0d2
  5.  
  6. Last Revision Wednesday, October 2, 1991
  7.  
  8.  
  9.  
  10.  
  11. Media Control Stack Description
  12. The Media Control stack (hereafter referred to as the MC stack) allows 
  13. the user to control a wide variety of interactive media devices from 
  14. HyperCard IIGS version 1.1.  Interactive media devices are most 
  15. clearly typified by CD-ROM drives and LaserDisc players although 
  16. certain other types of devices such as VCRs may contain a hardware 
  17. interface through which they can be controlled by a computer.
  18.  
  19. The MC stack controls these devices by interfacing with the Media 
  20. Control Tool which will be shipping with Apple IIGS System 6.0 and is 
  21. required to use this stack.  The MC stack also provides options to 
  22. work with the Apple II Video Overlay card.
  23.  
  24.  
  25. Media Control Stack Implementation
  26. The MC stack is one of two totally new stacks shipping with HyperCard 
  27. IIGS version 1.1.  The stack will reside on the HyperTalk Help disk 
  28. and be installed into a folder called Stacks along with the rest of 
  29. the stacks shipping with HyperCard IIGS version 1.1.  The Home stack 
  30. has been extended to include a link to this stack through the Tool Kit 
  31. card.  The MC stack is less than 100K in size.
  32.  
  33. The MC stack, like the rest of the HyperCard IIGS shipping stacks and 
  34. HyperCard IIGS itself, provides several levels of involvement and 
  35. complexity for the user.  Users who wish to play laser discs, CDs, 
  36. etc. may use the built in Media Control window to control these 
  37. devices from the Media Control stack or from any other stack.
  38.  
  39.                                                      
  40. Open File "Media.1" to see Figure 1 - Media Control Window
  41.  
  42. For those users wishing to create their own stacks but who are not 
  43. accomplished HyperTalk scripters, the stack provides a card of ready-
  44. made buttons which can be pasted into their own stacks and used 
  45. without modification.
  46.  
  47. The final level available to those who wish to script in HyperTalk are 
  48. the scripts of the ready-made buttons which can be examined for 
  49. examples of how to access the features of the Media Control XCMD.  
  50. Also available is a card which lists all features and syntax to use 
  51. them of the Media Control XCMD.  The MC stack will install this XCMD 
  52. in any stack of the user's choosing, just as in the Scripter's Tools 
  53. stack.
  54.  
  55. The Media Control XCMD
  56. The Media Control XCMD provides a HyperCard interface to the commands 
  57. available with the Media Control tool.  The commands presented to the 
  58. user have been kept as close as possible to the syntax and structure 
  59. of the Media Control tool commands but with regard to the different 
  60. audience who will be generally using the XCMD (scripters) as compared 
  61. to the tool (programmers).  For example,while the tool requires time 
  62. parameters to be input as BCD time values, the XCMD allows time in the 
  63. format "hh hours, mm minutes, ss seconds."
  64.  
  65. Media Control XCMD Commands
  66. The following section details the commands available through the Media 
  67. Control XCMD.
  68.  
  69.  
  70. Media Control Command - "Control"
  71. Syntax:
  72.      MediaControl <channel>, "Control", <cmd>
  73.  
  74. This powerful command provides access to many aspects of the Media 
  75. Control Toolset including audio output configurations and 
  76. communication parameters. The following subcommands are available:
  77.      Serial port subcommands
  78.      8data1stop, 8data2stop, 7data1stop, 7data2stop, 6data1stop, 
  79. 6data2stop
  80.      5data1stop,5data2stop
  81.      BaudDefault, Baud50, Baud75, Baud110, Baud134, Baud150, Baud300,
  82.      Baud600, Baud1200, Baud1800, Baud2400, Baud3600, Baud4800, 
  83. Baud7200
  84.      Baud9600, Baud19200
  85.      ControlCom, ModemPort, PrinterPort
  86.  
  87.      Audio channel subcommands
  88.      AudioLeft, AudioLinLR, AudioLinLMR, AudioLinR, AudioMinL, 
  89. AudioMinLLinR,
  90.      AudioMinLRinR, AudioMinR, AudioMonaural, AudioOff, AudioReverse,
  91.      AudioRight, AudioRinL, AudioRinLMR, AudioRinLR, AudioStereo
  92.  
  93.      Video subcommands
  94.      DisplayOff, DisplayOn, VideoOff, VideoOn
  95.  
  96.      Miscellaneous subcommands
  97.      Eject, IgnoreDiskSwitched, Initialize, LockDevice, 
  98. ReportDiskSwitched, UnlockDevice
  99.  
  100.  
  101. Media Control Command - "GetDiscID"
  102. Syntax:
  103.      MediaControl <channel>, "GetDiscID"
  104.  
  105. This command returns a unique ID for the currently running disc in the 
  106. global variable MediaResult.  For a CD, this value is the total number 
  107. of blocks or the serial number if available. 
  108.  
  109.  
  110. Media Control Command - "GetDriverName"
  111. Syntax:
  112.      MediaControl <channel>, "GetDriverName"
  113.  
  114. This returns the name, version, and port used for the device driver 
  115. currently connected to the specified channel in the global variable 
  116. MediaResult.
  117.  
  118. MediaResult will contain the text "NoPlayer" if no device driver is 
  119. connected to the specified channel.  
  120.  
  121. Media Control Command - "GetNumTracks"
  122. Syntax:
  123.      MediaControl <channel>, "GetNumTracks"
  124.  
  125. This command returns the number of tracks/ chapters on the media in 
  126. the device connected to the specified channel.  The value will be 
  127. returned in the global variable MediaResult. 
  128.  
  129.  
  130. Media Control Command - "GetPosition"
  131. Syntax:
  132.      MediaControl <channel>, "GetPosition", 
  133. "InChapters|InFrames|InTime"
  134.  
  135. This command returns the current position of the specified device. 
  136. This number will be returned in MediaResult if "InChapters" or 
  137. "InFrames" is selected.  If you specify "InTime", the location will be 
  138. returned in the form "hh hours, mm minutes, ss seconds" if the current 
  139. device supports this.
  140.  
  141.  
  142. Media Control Command - "GetSpeeds"
  143. Syntax:
  144.      MediaControl <channel>, "GetSpeeds"
  145.  
  146. This returns a comma delimited list of speeds (in frames per second) 
  147. that the device connected to the specified channel can play.  The list 
  148. of speeds is returned in the global variable MediaResult.  CD-ROM 
  149. drives do not generally support this command.
  150.  
  151.  
  152. Media Control Command - "GetStatus"
  153. Syntax:
  154.      MediaControl <channel>, "GetStatus", 
  155. "DeviceType|PlayStatus|DoorStatus|
  156.      DiscType|DiscSize|DiscSide"
  157.  
  158. This command enables you to determine the status of a device connected 
  159. to the specified channel.  The third parameter determines what type of 
  160. status is returned in the global variable MediaResult.
  161.  
  162.  
  163. Media Control Command - "GetTimes"
  164. Syntax:
  165.      MediaControl <channel>, "GetTimes", 
  166. "ElapsedTrack|RemainTrack|ElapsedDisc|
  167.      RemainDisc|TotalDisc|TotalFrames|Tracks"
  168.  
  169. This command returns information about the currently playing media 
  170. including total time, remaining time, starting and ending track 
  171. numbers, and total frames.  Time is returned in the form "hh hours, mm 
  172. minutes, ss seconds."
  173.  
  174.  
  175. Media Control Command - "JogBackward"
  176. Syntax:
  177.      MediaControl <channel>, "JogBackward", 
  178. "InChapters|InFrames|InTime",      <amount>
  179.  
  180. This command moves the specified device backward.  If moving by 
  181. chapter or frame, <amount> contains the number of frames or chapters 
  182. to move.  If moving backward in time, <amount> contains the amount of 
  183. time in the form "hh hours, mm minutes, ss seconds."
  184.  
  185.  
  186. Media Control Command - "JogForward"
  187. Syntax:
  188.      MediaControl <channel>, "JogForward", 
  189. "InChapters|InFrames|InTime",      <amount>
  190.  
  191. This command moves the specified device forward.  If moving by chapter 
  192. or frame, <amount> contains the number of frames or chapters to move.  
  193. If moving forward in time, <amount> contains the amount of time in the 
  194. form "hh hours, mm minutes, ss seconds."
  195.  
  196.  
  197. Media Control Command - "Pause"
  198. Syntax:
  199.      MediaControl <channel>, "Pause"
  200.  
  201. This command will put the device specified by <channel> into pause 
  202. mode if it is currently playing.  Playing can be resumed with the Play 
  203. command. 
  204.  
  205.  
  206. Media Control Command - "Play"
  207. Syntax:
  208.      MediaControl <channel>, "Play"
  209.  
  210. This command starts the device playing forward at normal play speed.
  211.  
  212.  
  213. Media Control Command - "Record"
  214. Syntax:
  215.      MediaControl <channel>, "Record"
  216.  
  217. This command initiates record mode if the specified device has that 
  218. capability.
  219.  
  220.  
  221. Media Control Command - "Remote"
  222. Syntax:
  223.      MediaControl "Remote"
  224.  
  225. This command creates and displays a movable window from which you can 
  226. perform many of the basic Media Control commands.  It will remain open 
  227. and active until you click its close box, close it from HyperTalk, or 
  228. exit HyperCard.  This window can be used to control interactive media 
  229. devices while in other stacks.  Commands are sent to the channel 
  230. specified by the MediaChannel global variable.
  231.  
  232.  
  233. Media Control Command - "ScanBackward"
  234. Syntax:
  235.      MediaControl <channel>, "ScanBackward"
  236.  
  237. This causes the device connected to the specified channel to scan 
  238. backward.  The results of this command are device dependent.  Some 
  239. devices, notably the Apple CDSC drive, will scan backward until 
  240. stopped with another command.  Many laserdisc players will scan a 
  241. short distance and stop.
  242.  
  243.  
  244. Media Control Command - "ScanForward"
  245. Syntax:
  246.      MediaControl <channel>, "ScanForward"
  247.  
  248. This causes the device connected to the specified channel to scan 
  249. forward.  The results of this command are device dependent.  Some 
  250. devices, notably the Apple CDSC drive, will scan forward until stopped 
  251. with another command.  Many laserdisc players will scan a short 
  252. distance and stop.
  253.  
  254.  
  255. Media Control Command - "SearchTo"
  256. Syntax:
  257.      MediaControl <channel>, "SearchTo", 
  258. "InChapters|InFrames|InTime", 
  259.      <location>
  260.  
  261. This command moves the specified device to <location>.  If moving by 
  262. chapter or frame, <location> contains the frame or chapter number 
  263. requested.  If "InTime" is specified, <location> contains the time 
  264. requested in the form "hh hours, mm minutes, ss seconds."
  265.  
  266.  
  267. Media Control Command - "SetSpeed"
  268. Syntax:
  269.      MediaControl <channel>, "SetSpeed", <fps>
  270.  
  271. This causes the connected device to play at the specified number of 
  272. frames per second <fps>.  The device will play at this speed the next 
  273. time it receives a play command.  The frame speed is reset to normal 
  274. (30 fps) after each play command.  Use the GetSpeeds command to 
  275. determine what speeds are available for a particular device.
  276.  
  277.  
  278. Media Control Command - "Stop"
  279. Syntax:
  280.      MediaControl <channel>, "Stop"
  281.  
  282. This command stops the device connected to the specified channel.  
  283. After this command, some devices will resume play at the current 
  284. location while others will return to the beginning of the media. 
  285.  
  286.  
  287. Media Control Command - "StopAt"
  288. Syntax:
  289.      MediaControl <channel>, "StopAt",  "InChapters|InFrames|InTime", 
  290. <stopLoc>
  291.  
  292. This command sets the location at which the specified device will stop 
  293. playing.  If setting the stop location to a chapter or frame, 
  294. <stopLoc> contains the frame or chapter number.  If setting the stop 
  295. location to a particular time, <stopLoc> contains the time in the form 
  296. "hh hours, mm minutes, ss seconds."
  297.  
  298.  
  299. Media Control Command - "VideoOverlay"
  300. Syntax:
  301.      MediaControl "VideoOverlay", "on|off"
  302.  
  303. This command enables or disables the video overlay feature of the 
  304. Apple II Video Overlay Card.
  305.  
  306.  
  307.  
  308.  
  309.  
  310. Cards in the Media Control Stack
  311. The following are screen shots of the five cards in the MC stack.
  312.  
  313.                                             
  314. Open File "Media.2" to see Figure 2 - Media Control Stack Menu Card
  315.  
  316.  
  317.                                             
  318. Open File "Media.3" to see Figure 3 - Media Control Stack Commands Card
  319.  
  320.  
  321.                                             
  322. Open File "Media.4" to see Figure 4 - Media Control Stack ReadyMade Buttons Card
  323.  
  324.  
  325.                                             
  326. Open File "Media.5" to see Figure 5 - Media Control Stack Video Overlay Card
  327.  
  328.  
  329.                                             
  330. Open File "Media.6" to see Figure 6 - Media Control Stack Information Card
  331.  
  332.